import Vue from "vue";
import Router from "vue-router";
import Foodie from "@/components/foodie/wty-index.vue";
import Shop from "@/components/shop/wty-index.vue";
import Take from "@/components/take/wty-index.vue";
import ShopMenu from "@/components/shop/wty-menu/wty-menu.vue";
import ShopEvaluate from "@/components/shop/wty-evaluate/wty-evaluate.vue";
import ShopSafety from "@/components/shop/wty-safety/wty-safety.vue";

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: "/",
      component: Foodie
    },
    {
      path: "/foodie",
      component: Foodie
    },
    {
      path: "/take",
      component: Take
    },
    {
      path: "/shop",
      component: Shop,
      children: [
        {
          path: "",
          component: ShopMenu
        },
        {
          path: "wty-menu", // 不要加 "/"
          component: ShopMenu
        },
        {
          path: "wty-evaluate",
          component: ShopEvaluate
        },
        {
          path: "wty-safety",
          component: ShopSafety
        }
      ]
    }
  ]
});
